<div class="row">
	<div class="col-xs-12">
		<table id="tbStatTable" class="table table-hover"
			data-pagination="true" data-page-size="10"
			data-page-list="[]" data-striped="true">
			<thead>
				<tr>
					<th data-field="id">序号</th>
					<th data-field="name">数据表名</th>
					<th data-field="selectCount" data-sortable="true">查询次数</th>
					<th data-field="selectIntoCount">查询插入次数</th>
					<th data-field="insertCount">插入次数</th>
					<th data-field="updateCount">更新次数</th>
					<th data-field="deleteCount">删除次数</th>
					<th data-field="fetchRowCount" data-sortable="true">读取数据行数</th>
					<th data-field="deleteDataCount">删除数据行数</th>
					<th data-field="truncateCount">清空表次数</th>
					<th data-field="createCount">创建表次数</th>
					<th data-field="alterCount">变更表次数</th>
					<th data-field="dropCount">删除表次数</th>
					<th data-field="replaceCount">替换表次数</th>
				</tr>
			</thead>
			<tbody></tbody>
		</table>
	</div>
</div>
<script type="text/javascript">
function replace (data) {
	if((!data)||data === undefined){
		return '';
	}else{
		return format(data);
	}
}
function format(s) {
	var str=s+='';
	return str.replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");
}
$(document).ready(function(){
	$.ajax({
		type: 'POST',
		url: "system/monitor/druid/res/wall.json",
		success: function(data) {
			var tables = data.Content.tables;
			if (tables) {
				for (var i = 0; i < tables.length; i++) {
					tables[i].id=i+1;
				}
				$("#tbStatTable").bootstrapTable({data:tables});
			}
		},
		dataType: "json"
	});
});
</script>